package com.stx.design.factory;

public class FactoryTest {
	
	public static void Test(){
		
		System.out.print("=========Begin Simple Factory=========\r\n");
		SimpleMouseFactory simpleFactory = new SimpleMouseFactory();
		simpleFactory.createMouse(SimpleMouseFactory.HP_MOUSE).sayHi();
		System.out.print("End Simple Factory...\r\n");
		
		System.out.print("Begin Factory...\r\n");
		MouseFactory factory = new DellMouseFactory();
		factory.createMouse().sayHi();
		System.out.print("End Factory...\r\n");
		
		System.out.print("Begin Abstract Factory...\r\n");
		PCFactory pcFactory = new DellFactory();
		pcFactory.createMouse().sayHi();
		pcFactory.createKeyboard().sayHi();
		System.out.print("=========End Abstract Factory=========\r\n");
	}
}
